import java.util.ArrayList;
import junit.framework.TestCase;
import de.unibi.comet.ac.StringSetProvider;

public class StringSetProviderTest extends TestCase {

	private StringSetProvider ssp;
	
	protected void setUp() throws Exception {
		ArrayList<String> l = new ArrayList<String>();
		l.add("hello");
		l.add("world");
		l.add("heho");
		l.add("universe");
		ssp = new StringSetProvider(l);
	}

	public void testStringSetResourceProvider() {
		assertEquals(4, ssp.getStringCount());
		assertEquals(22+5, ssp.getTotalLength());
		assertEquals(22+5, ssp.getTotalLength(true));
		assertEquals(22, ssp.getTotalLength(false));
		assertEquals(8, ssp.getLongestString());
	}

	public void testGetSuffixStructure() {
		fail("Not yet implemented");
	}

	public void testGetReverseSuffixStructure() {
		fail("Not yet implemented");
	}

	public void testGetJoinedString() {
		assertEquals("$heho$hello$universe$world$", ssp.getJoinedString());
	}

	public void testGetReverseJoinedString() {
		assertEquals("$dlrow$esrevinu$olleh$oheh$", ssp.getReverseJoinedString());
	}

}
